package leetcode.lt100;

public class Solution_41 {
	public int firstMissingPositive(int[] nums) {
		int l = nums.length;
		for (int i = 0; i < l; ++i) {
			while (check(nums,i)) {
				swap(nums, nums[i], nums[nums[i] - 1]);
			}
		}
		return l;
	}

	private boolean check(int[] nums, int i) {
		if(nums[i]!=i){
			
		}
		return false;
	}

	private void swap(int[] nums, int i, int j) {
		int temp = nums[i];
		nums[i] = nums[j];
		nums[j] = temp;
	}

}